#!/usr/bin/env python

import boto
import sys
from boto.s3.connection import OrdinaryCallingFormat


conn = boto.connect_s3(
    host='{{ getv "/deis/store/gateway/host" }}',
    port={{ getv "/deis/store/gateway/port" }},
    is_secure=False,
    calling_format=OrdinaryCallingFormat())
name = sys.argv[1]

if conn.lookup(name) is None:
    conn.create_bucket(name)
